7dae485482552bb9d8ee00006ad3235d3d06c5a6,squidlib-util/src/main/java/squidpony/squidmath/WhirlingNoise.java,WhirlingNoise,noise,#number#number#number#,271
Before Change
double s = (xin + yin + zin) * F3; // Very nice and simple skew
// factor for 3D
int i = (int) Math.floor(xin + s);
int j = (int) Math.floor(yin + s);
int k = (int) Math.floor(zin + s);
double t = (i + j + k) * G3;
double X0 = i - t; // Unskew the cell origin back to (x,y,z) space
double Y0 = j - t;
double Z0 = k - t;
double x0 = xin - X0; // The x,y,z distances from the cell origin
double y0 = yin - Y0;
double z0 = zin - Z0;
// For the 3D case, the simplex shape is a slightly irregular
// tetrahedron.
// Determine which simplex we are in.
After Change
double s = (xin + yin + zin) * F3; // Very nice and simple skew
// factor for 3D
int i = fastFloor(xin + s);
int j = fastFloor(yin + s);
int k = fastFloor(zin + s);
double t = (i + j + k) * G3;
double X0 = i - t; // Unskew the cell origin back to (x,y,z) space
double Y0 = j - t;
double Z0 = k - t;
double x0 = xin - X0; // The x,y,z distances from the cell origin
double y0 = yin - Y0;
double z0 = zin - Z0;
// For the 3D case, the simplex shape is a slightly irregular
// tetrahedron.
// Determine which simplex we are in.